package com.compass.doctor.ui.patient.adapter

import android.view.LayoutInflater
import android.view.ViewGroup
import com.compass.doctor.databinding.LayoutSeeDoctorItemBinding
import com.compass.framework.adapter.BaseBindViewHolder
import com.compass.framework.adapter.BaseRecyclerViewAdapter
import com.compass.framework.model.PatientISeeRecord
import com.compass.framework.utils.DateUtils

/**
 * Description： 信息记录adapter
 * Date:2023/12/14 14:24
 */


class RecordInformationAdapter : BaseRecyclerViewAdapter<PatientISeeRecord, LayoutSeeDoctorItemBinding>() {
    override fun onBindDefViewHolder(
        holder: BaseBindViewHolder<LayoutSeeDoctorItemBinding>,
        item: PatientISeeRecord?,
        position: Int
    ) {
        if (item == null) return
        holder.binding.apply {

            tvDiagnosis.text=item.diseaseDescriptionText
            tvName.text=item.doctorName
            tvSeeDoctorTime.text=DateUtils.conversionTime(item.createTime,DateUtils.FORMAT_TWO)


        }
    }

    override fun getViewBinding(
        layoutInflater: LayoutInflater,
        parent: ViewGroup,
        viewType: Int
    ): LayoutSeeDoctorItemBinding {
        return LayoutSeeDoctorItemBinding.inflate(layoutInflater, parent, false)
    }
}